<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>添加院校</title>
<link href="css/base.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../include/js/dedeajax2.js"></script>
<script type="text/javascript" src="js/calendar/calendar.js"></script>
<script language='javascript' src='js/main.js'></script>
<script language="javascript">

// 检查表单填写情况
function checkSubmit(){
    if(document.form1.name.value==""){
        alert("院校名称不能为空！");
        return false;
    }
}
</script>
</head>
<body topmargin="8">
<form name="form1" action="collegeinfo_edit.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit();">
  <input type="hidden" name="dopost" value="save" />
  <input type="hidden" name="college_id" value="<?php echo $college_id; ?>"/>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="85%" height="30"><IMG height=14 src="images/book1.gif" width=20>&nbsp;<a href="collegeinfo_list.php"><u>院校MBA库管理</u></a>&gt;&gt; 添加院校</td>
    </tr>
  </table>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" >
    <tr>
      <td colspan="2"><table width="168" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="84" height="24" align="center" background="images/itemnote1.gif">&nbsp;基本信息&nbsp;</td>
            <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem2()"><u>详细信息</u></a>&nbsp;</td>
          </tr>
        </table></td>
    </tr>
  </table>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head2" style="display:none">
    <tr>
      <td colspan="2"><table width="168" height="24" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem1()"><u>基本信息</u></a>&nbsp;</td>
            <td width="84" align="center" background="images/itemnote1.gif">详细信息</td>
          </tr>
        </table></td>
    </tr>
  </table>
  <table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #cfcfcf;background:#ffffff;">
    <tr>
      <td height="24" colspan="4" class="bline"><table width="900" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;院校名称：</td>
            <td width='408'><input name="name" type="text"  style="width:388px" value="<?php echo $collegeinfo_totle['name']; ?>"/></td>
            <td width="90">&nbsp;英文名称：</td>
            <td><input name="english_name" type="text" style="width:250px" value="<?php echo $collegeinfo_totle['englishName']; ?>"/></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;创办时间：</td>
            <td width='300'><input name="found_time" type="text"   style="width:200px" value="<?php echo $collegeinfo_totle['foundTime']; ?>"/>&nbsp;年</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;地区：</td>
            <td width="240">
              <?php echo GetEnumsForm('area',$collegeinfo_totle['area'],'area'); ?>
            </td>
            <td width="90">&nbsp;详细地址：</td>
            <td><input name="address" type="text" style="width:450px" value="<?php echo $collegeinfo_totle['address']; ?>"/></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="6" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;学费：</td>
            <td>
              <input name="lowest_fee" type="text" style="width:150px" value="<?php echo $collegeinfo_totle['lowestFee']; ?>"/>&nbsp;万&nbsp;-&nbsp;
            </td>
            <td>
              <input name="highest_fee" type="text" style="width:150px" value="<?php echo $collegeinfo_totle['highestFee']; ?>"/>&nbsp;万（如果没有学费范围的第二个输入框请留空）
            </td>
            <td width="90">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;学费范围：</td>
            <td>
              <?php echo GetEnumsForm('feeRange',$collegeinfo_totle['feeRange'],'fee_range'); ?>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">是否推荐：</td>
           <td><input name="recommend" type="radio" class="np" value="1" <?php if ($collegeinfo_totle['recommend']) {
              echo "checked='1'";
            } ?>/>
              是
              <input type="radio" name="recommend" class="np" value="0"  <?php if ($collegeinfo_totle['recommend']==0) {
              echo "checked='1'";
            } ?>/>
              否 </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr id="pictable">
      <td height="24" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;校徽图片：</td>
            <td width="560">
              <table width="100%" border="0" cellspacing="1" cellpadding="1">
                <tr>
                  <?php if ($collegeinfo_totle['logo']!='') {
                  ?>
                  <td>
                  <a href="<?php echo $cfg_clihost.$collegeinfo_totle['logo'];?>" target="_blank"><img src="<?php echo $cfg_clihost.$collegeinfo_totle['logo'];?>" height=83px ></a>
                  <input type='hidden' value="<?php echo $collegeinfo_totle['logo'];?>" name='logo'>
                  </td>
                  <td>上传新图片：</td>
                  <td height="30">
                  <input name="logo_new" type="file" id="logo" size="30" />
                  </td>
                  <?php } else {?>
                  <input type='hidden' value="<?php echo $collegeinfo_totle['logo'];?>" name='logo'>
                  <td height="30">
                  <input name="logo_new" type="file" id="logo" size="30" />
                  </td>
                  <?php } ?>
                </tr>
              </table>
            </td>
            <td width="150" align="center"><div id='divpicview' class='divpre'></div></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;国际认证 ：</td>
            <td width='408'><input name="inter_attest" type="text"  value="<?php echo $collegeinfo_totle['interAttest']; ?>" style="width:388px" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <tr>
            <td width="90">&nbsp;项目类型：</td>
            <td>
              <?php  
                  $project_type_data = getTopData('projectType');
                  foreach ($project_type_data as $key => $value) {
                    $checked = '';
                    if (in_array($key, explode(',', $collegeinfo_totle['projectType']))) {
                      $checked = "checked='checked'";
                    }
                    echo "<input class='np' type='checkbox' name='project_type[]'  value='$key'".$checked.">$value";
                  }
              ?>
            </td>
            </tr>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <tr>
            <td width="90">&nbsp;院校性质：</td>
            <td>
              <?php  
                  $level_data = getTopData('level');
                  foreach ($level_data as $key => $value) {
                    $checked = '';
                    if (in_array($key, explode(',', $collegeinfo_totle['level']))) {
                      $checked = "checked='checked'";
                    }
                    echo "<input class='np' type='checkbox' name='level[]'  value='$key'".$checked.">$value";
                  }
              ?>
            </td>
            </tr>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90" height="22">&nbsp;分数线类别：</td>
            <td width="240">
                <?php echo GetEnumsForm('scoreType',$collegeinfo_totle['scoreType'],'score_type'); ?>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;院校简介：</td>
            <td width="520"><textarea name="project_summary" rows="5" id="description" style="width:80%;height:60px"><?php echo $collegeinfo_totle['projectSummary']; ?></textarea></td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            
          </tr>
        </table>
      </td>
    </tr>  
  </table>
  <table width="98%"  border="0" align="center" cellpadding="2" style="border:1px solid #cfcfcf;background:#ffffff;display:none;" cellspacing="2" id="adset">
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr bgcolor="#FBFCE2">
            <td width="113">院校介绍</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;院校简介：</td>
            <td width="920">
              <?php
                 GetEditor("detail_summary",$collegeinfo_totle['detailSummary'],"300");
              ?>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr bgcolor="#FBFCE2">
            <td width="113">招生信息</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;学费介绍：</td>
            <td width="520"><textarea name="fee_introduction" rows="5" id="description" style="width:80%;height:60px"><?php echo $collegeinfo_totle['feeIntroduction']; ?></textarea></td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;学制：</td>
            <td width='408'><input name="edu_time" type="text"  value="<?php echo $collegeinfo_totle['eduTime']; ?>" style="width:388px" />&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">是否接受调剂：</td>
            <td><input name="regulator" type="radio" class="np" value="1" <?php 
                if ($collegeinfo_totle['regulator']) {
                  echo "checked='1'";
                }
            ?>/>
              是
              <input type="radio" name="regulator" class="np" value="0" 
              <?php 
                if ($collegeinfo_totle['regulator']==0) {
                  echo "checked='1'";
                }
            ?> />
              否 </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;招生人数：</td>
            <td width='300'><input name="recruit_num" type="text"  value="<?php echo $collegeinfo_totle['recruitNum']; ?>" style="width:200px" />&nbsp;人</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;奖学金介绍：</td>
            <td width="520"><textarea name="scholarship" rows="5" id="description" style="width:80%;height:60px"><?php echo $collegeinfo_totle['scholarship']; ?></textarea></td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;历年分数线：</td>
            <td width="520"><textarea name="score_line_log" rows="5" id="description" style="width:80%;height:60px"><?php echo $collegeinfo_totle['scoreLineLog']; ?></textarea></td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;院校官网：</td>
            <td width='408'><input name="internet_site" type="text" value="<?php echo $collegeinfo_totle['internetSite']; ?>" style="width:388px" />&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr id="pictable">
      <td height="24" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;院校图片：</td>
            <td width="560">
              <table width="100%" border="0" cellspacing="1" cellpadding="1">
                <?php if ($collegeinfo_totle['picture']!='') {
                  ?>
                  <td>
                  <a href="<?php echo $cfg_clihost.$collegeinfo_totle['picture'];?>" target="_blank"><img src="<?php echo $cfg_clihost.$collegeinfo_totle['picture'];?>" height=83px ></a>
                  <input type='hidden' value="<?php echo $collegeinfo_totle['picture'];?>" name='picture'>
                  </td>
                  <td>上传新图片：</td>
                  <td height="30">
                  <input name="picture_new" type="file" id="picture" size="30" />
                  </td>
                  <?php } else {?>
                  <input type='hidden' value="<?php echo $collegeinfo_totle['picture'];?>" name='picture'>
                  <td height="30">
                  <input name="picture_new" type="file" id="picture" size="30" />
                  </td>
                  <?php } ?>
              </table>
            </td>
            <td width="150" align="center"><div id='divpicview' class='divpre'></div></td>
          </tr>
        </table></td>
    </tr>
     <tr id="pictable">
      <td height="24" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;资讯栏图片：</td>
            <td width="560">
              <table width="100%" border="0" cellspacing="1" cellpadding="1">
                <?php if ($collegeinfo_totle['newsPicture']!='') {
                  ?>
                  <td>
                  <a href="<?php echo $cfg_clihost.$collegeinfo_totle['newsPicture'];?>" target="_blank"><img src="<?php echo $cfg_clihost.$collegeinfo_totle['newsPicture'];?>" height=83px ></a>
                  <input type='hidden' value="<?php echo $collegeinfo_totle['newsPicture'];?>" name='news_picture'>
                  </td>
                  <td>上传新图片：</td>
                  <td height="30">
                  <input name="news_picture_new" type="file" id="picture" size="30" />
                  </td>
                  <?php } else {?>
                  <input type='hidden' value="<?php echo $collegeinfo_totle['newsPicture'];?>" name='news_picture'>
                  <td height="30">
                  <input name="news_picture_new" type="file" id="picture" size="30" />
                  </td>
                  <?php } ?>
              </table>
            </td>
            <td width="150" align="center"><div id='divpicview' class='divpre'></div></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr bgcolor="#FBFCE2">
            <td width="113">历年招生数据</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="8" class="bline"><table width="900" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;年份一：</td>
            <td><input name="recruit_year[0]" type="text"  value="<?php echo $collegeinfo_recruit[0]['year']; ?>" />年</td>
            <td>&nbsp;报考人数：</td>
            <td><input name="recruit_apply_num[0]" type="text"  value="<?php echo $collegeinfo_recruit[0]['applyNum']; ?>" />人</td>
            <td>&nbsp;实考人数：</td>
            <td><input name="recruit_exam_num[0]" type="text"  value="<?php echo $collegeinfo_recruit[0]['examNum']; ?>" />人</td>
            <td>&nbsp;录取人数：</td>
            <td><input name="recruit_recruit_num[0]" type="text"  value="<?php echo $collegeinfo_recruit[0]['recruitNum']; ?>" />人</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="8" class="bline"><table width="900" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;年份二：</td>
            <td><input name="recruit_year[1]" type="text"  value="<?php echo $collegeinfo_recruit[1]['year']; ?>" />年</td>
            <td>&nbsp;报考人数：</td>
            <td><input name="recruit_apply_num[1]" type="text"  value="<?php echo $collegeinfo_recruit[1]['applyNum']; ?>" />人</td>
            <td>&nbsp;实考人数：</td>
            <td><input name="recruit_exam_num[1]" type="text"  value="<?php echo $collegeinfo_recruit[1]['examNum']; ?>" />人</td>
            <td>&nbsp;录取人数：</td>
            <td><input name="recruit_recruit_num[1]" type="text"  value="<?php echo $collegeinfo_recruit[1]['recruitNum']; ?>" />人</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="8" class="bline"><table width="900" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;年份三：</td>
            <td><input name="recruit_year[2]" type="text"  value="<?php echo $collegeinfo_recruit[2]['year']; ?>" />年</td>
            <td>&nbsp;报考人数：</td>
            <td><input name="recruit_apply_num[2]" type="text"  value="<?php echo $collegeinfo_recruit[2]['applyNum']; ?>" />人</td>
            <td>&nbsp;实考人数：</td>
            <td><input name="recruit_exam_num[2]" type="text"  value="<?php echo $collegeinfo_recruit[2]['examNum']; ?>" />人</td>
            <td>&nbsp;录取人数：</td>
            <td><input name="recruit_recruit_num[2]" type="text"  value="<?php echo $collegeinfo_recruit[2]['recruitNum']; ?>" />人</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr bgcolor="#FBFCE2">
            <td width="113">著名教授信息</td>
            <td><input type="button" name="Submit" value="添加教授" onclick="AddSignRow_professor()" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="5" class="bline">
        <!-- 该input记录下一条添加tr中td的数组元素号 -->
        <input name='txtTRLastIndex_professor' type='hidden' id='txtTRLastIndex_professor' value="<?php if(count($collegeinfo_professor)>0) 
                  echo count($collegeinfo_professor); 
                else
                  echo "1";             
          ?>" />
        <table width="800" border="0" cellspacing="0" id="professor_info"  cellpadding="0">
          <?php if(count($collegeinfo_professor)<=0){ ?>
          <tr id="professor0">
            <td>1</td>
            <td>&nbsp;教授姓名：</td>
            <td><input name="professor_name[0]" type="text"  value="" /></td>
            <td>&nbsp;教授照片：</td>
            <td><input name="professor_picture[0]" type="file" id="logo" size="30" /></td>
            <td><a href="javascript:;" onclick="DeleteSignRow_professor('professor0')">删除</a></td>
          </tr>
          <?php }else{
            foreach ($collegeinfo_professor as $key => $value) { ?>
          <tr id="professor<?php echo $key; ?>">
            <td><?php echo $key+1; ?></td>
            <td>&nbsp;教授姓名：</td>
            <td><input name="professor_name[<?php echo $key; ?>]" type="text"  value="<?php echo $value['name']; ?>" /></td>
            <td>&nbsp;教授照片：</td>
            <?php if ($value['picture']!='') {
            ?>
            <td>
              <a href="<?php echo $cfg_clihost.$value['picture'];?>" target="_blank"><img src="<?php echo $cfg_clihost.$value['picture'];?>" height=83px ></a>
              <input type='hidden' value="<?php echo $value['picture'];?>" name="professor_picture[<?php echo $key; ?>]">
            </td>
            <td>上传新图片：</td>
            <td height="30">
              <input name="professor_picture_new[<?php echo $key; ?>]" type="file" id="picture" size="30" />
            </td>
            <?php } else {?>
            <td height="30">
              <!-- 为了便于对提交数据后台的处理，这里新上传的也统一name为professor_picture_new -->
              <input type='hidden' value="<?php echo $value['picture'];?>" name="professor_picture[<?php echo $key; ?>]">
              <input name="professor_picture_new[<?php echo $key; ?>]" type="file" id="picture" size="30" />
            </td>
            <?php } ?>
            <td><a href="javascript:;" onclick="DeleteSignRow_professor('professor<?php echo $key; ?>')">删除</a></td>
          </tr>
          <?php  }
          }
          ?>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr bgcolor="#FBFCE2">
            <td width="113">著名校友信息</td>
            <td><input type="button" name="Submit" value="添加校友" onclick="AddSignRow_graduate()" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="5" class="bline">
        <!-- 该input记录下一条添加tr中td的数组元素号 -->
        <input name='txtTRLastIndex_graduate' type='hidden' id='txtTRLastIndex_graduate' value="<?php if(count($collegeinfo_graduate)>0) 
                  echo count($collegeinfo_graduate); 
                else
                  echo "1";             
          ?>" />
        <table width="800" border="0" cellspacing="0" id="graduate_info"  cellpadding="0">
          <?php if(count($collegeinfo_graduate)<=0){ ?>
          <tr id="graduate0">
            <td>1</td>
            <td>&nbsp;校友姓名：</td>
            <td><input name="graduate_name[0]" type="text"  value="" /></td>
            <td>&nbsp;校友照片：</td>
            <td><input name="graduate_picture[0]" type="file" id="logo" size="30" /></td>
            <td><a href="javascript:;" onclick="DeleteSignRow_graduate('graduate0')">删除</a></td>
          </tr>
          <?php }else{
            foreach ($collegeinfo_graduate as $key => $value) { ?>
          <tr id="graduate<?php echo $key; ?>">
            <td><?php echo $key+1; ?></td>
            <td>&nbsp;校友姓名：</td>
            <td><input name="graduate_name[<?php echo $key; ?>]" type="text"  value="<?php echo $value['name']; ?>" /></td>
            <td>&nbsp;校友照片：</td>
            <?php if ($value['picture']!='') {
            ?>
            <td>
              <a href="<?php echo $cfg_clihost.$value['picture'];?>" target="_blank"><img src="<?php echo $cfg_clihost.$value['picture'];?>" height=83px ></a>
              <input type='hidden' value="<?php echo $value['picture'];?>" name="graduate_picture[<?php echo $key; ?>]">
            </td>
            <td>上传新图片：</td>
            <td height="30">
              <input name="graduate_picture_new[<?php echo $key; ?>]" type="file" id="picture" size="30" />
            </td>
            <?php } else {?>
            <td height="30">
              <!-- 为了便于对提交数据后台的处理，这里新上传的也统一name为graduate_picture_new -->
              <input type='hidden' value="<?php echo $value['picture'];?>" name="graduate_picture[<?php echo $key; ?>]">
              <input name="graduate_picture_new[<?php echo $key; ?>]" type="file" id="picture" size="30" />
            </td>
            <?php } ?>
            <td><a href="javascript:;" onclick="DeleteSignRow_graduate('graduate<?php echo $key; ?>')">删除</a></td>
          </tr>
          <?php  }
          }
          ?>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr bgcolor="#FBFCE2">
            <td width="113">项目特色介绍</td>
            <td><input type="button" name="Submit" value="添加段落" onclick="AddSignRow_project()" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="5" class="bline">
        <!-- 该input记录下一条添加tr的条数号 -->
        <input name='txtTRLastIndex_project' type='hidden' id='txtTRLastIndex_project' value="
        <?php if(count($collegeinfo_project)>0) 
                  echo count($collegeinfo_project); 
                else
                  echo "1";             
        ?>" />
        <table width="800" border="0" cellspacing="0" id="project_info"  cellpadding="0">
          <?php if(count($collegeinfo_project)<=0){ ?>
          <tr id="project0">
            <td>1</td>
            <td>&nbsp;小标题：</td>
            <td><input name="project_title[0]" type="text"  value="" /></td>
            <td>&nbsp;内容：</td>
            <td><textarea name="project_content[0]" rows="8" style="width:520px;height:70px"></textarea></td>
            <td><a href="javascript:;" onclick="DeleteSignRow_project('project0')">删除</a></td>
          </tr>
          <?php }else{
          foreach ($collegeinfo_project as $key => $value) { ?>
          <tr id="project<?php echo $key; ?>">
            <td><?php echo $key+1; ?></td>
            <td>&nbsp;小标题：</td>
            <td><input name="project_title[<?php echo $key; ?>]" type="text"  value="<?php echo $value['title']; ?>" /></td>
            <td>&nbsp;内容：</td>
            <td><textarea name="project_content[<?php echo $key; ?>]" rows="8" style="width:520px;height:70px"><?php echo $value['content']; ?></textarea></td>
            <td><a href="javascript:;" onclick="DeleteSignRow_project('project<?php echo $key; ?>')">删除</a></td>
          </tr>
          <?php  }
          }
          ?>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr bgcolor="#FBFCE2">
            <td width="113">最新资讯</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="24" colspan="4" class="bline"><table width="1080" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="90">&nbsp;标题1：</td>
            <td width='408'><input name="news_title[0]" type="text"  value="<?php echo $collegeinfo_news[0]['title']; ?>" style="width:388px" /></td>
            <td width="90">&nbsp;链接1：</td>
            <td><input name="news_link[0]" type="text" style="width:250px" value="<?php echo $collegeinfo_news[0]['link']; ?>"/></td>
            <td width="90">&nbsp;发布时间1：</td>
            <td>
            <?php
              $form_time = empty($collegeinfo_news[0]['addTime'])? GetDateTimeMk(time()) : date("Y-m-d H:i:s",$collegeinfo_news[0]['addTime']);
              echo "<input name=\"news_addtime[0]\" value=\"$form_time\" type=\"text\" id=\"pubdate0\" style=width:120px;\">";
            ?>
            <script language="javascript" type="text/javascript">
              Calendar.setup({
                inputField     :    "pubdate0",
                ifFormat       :    "%Y-%m-%d %H:%M:%S",
                showsTime      :    true,
                timeFormat     :    "24"
              });
            </script>
            </td>
          </tr>
          <tr>
            <td width="90">&nbsp;标题2：</td>
            <td width='408'><input name="news_title[1]" type="text"  value="<?php echo $collegeinfo_news[1]['title']; ?>" style="width:388px" /></td>
            <td width="90">&nbsp;链接2：</td>
            <td><input name="news_link[1]" type="text" style="width:250px" value="<?php echo $collegeinfo_news[1]['link']; ?>"/></td>
            <td width="90">&nbsp;发布时间2：</td>
            <td>
            <?php
              $form_time = empty($collegeinfo_news[1]['addTime'])? GetDateTimeMk(time()) : date("Y-m-d H:i:s",$collegeinfo_news[1]['addTime']);
              echo "<input name=\"news_addtime[1]\" value=\"$form_time\" type=\"text\" id=\"pubdate1\" style=width:120px;\">";
            ?>
            <script language="javascript" type="text/javascript">
              Calendar.setup({
                inputField     :    "pubdate1",
                ifFormat       :    "%Y-%m-%d %H:%M:%S",
                showsTime      :    true,
                timeFormat     :    "24"
              });
            </script>
            </td>
          </tr>
          <tr>
            <td width="90">&nbsp;标题3：</td>
            <td width='408'><input name="news_title[2]" type="text"  value="<?php echo $collegeinfo_news[2]['title']; ?>" style="width:388px" /></td>
            <td width="90">&nbsp;链接3：</td>
            <td><input name="news_link[2]" type="text" style="width:250px" value="<?php echo $collegeinfo_news[2]['link']; ?>"/></td>
            <td width="90">&nbsp;发布时间3：</td>
            <td>
            <?php
              $form_time = empty($collegeinfo_news[2]['addTime'])? GetDateTimeMk(time()) : date("Y-m-d H:i:s",$collegeinfo_news[2]['addTime']);
              echo "<input name=\"news_addtime[2]\" value=\"$form_time\" type=\"text\" id=\"pubdate2\" style=width:120px;\">";
            ?>
            <script language="javascript" type="text/javascript">
              Calendar.setup({
                inputField     :    "pubdate2",
                ifFormat       :    "%Y-%m-%d %H:%M:%S",
                showsTime      :    true,
                timeFormat     :    "24"
              });
            </script>
            </td>
          </tr>
          <tr>
            <td width="90">&nbsp;标题4：</td>
            <td width='408'><input name="news_title[3]" type="text"  value="<?php echo $collegeinfo_news[3]['title']; ?>" style="width:388px" /></td>
            <td width="90">&nbsp;链接4：</td>
            <td><input name="news_link[3]" type="text" style="width:250px" value="<?php echo $collegeinfo_news[3]['link']; ?>"/></td>
            <td width="90">&nbsp;发布时间4：</td>
            <td>
            <?php
              $form_time = empty($collegeinfo_news[3]['addTime'])? GetDateTimeMk(time()) : date("Y-m-d H:i:s",$collegeinfo_news[3]['addTime']);
              echo "<input name=\"news_addtime[3]\" value=\"$form_time\" type=\"text\" id=\"pubdate3\" style=width:120px;\">";
            ?>
            <script language="javascript" type="text/javascript">
              Calendar.setup({
                inputField     :    "pubdate3",
                ifFormat       :    "%Y-%m-%d %H:%M:%S",
                showsTime      :    true,
                timeFormat     :    "24"
              });
            </script>
            </td>
          </tr>
          <tr>
            <td width="90">&nbsp;标题5：</td>
            <td width='408'><input name="news_title[4]" type="text"  value="<?php echo $collegeinfo_news[4]['title']; ?>" style="width:388px" /></td>
            <td width="90">&nbsp;链接5：</td>
            <td><input name="news_link[4]" type="text" style="width:250px" value="<?php echo $collegeinfo_news[4]['link']; ?>"/></td>
            <td width="90">&nbsp;发布时间5：</td>
            <td>
            <?php
              $form_time = empty($collegeinfo_news[4]['addTime'])? GetDateTimeMk(time()) : date("Y-m-d H:i:s",$collegeinfo_news[4]['addTime']);
              echo "<input name=\"news_addtime[4]\" value=\"$form_time\" type=\"text\" id=\"pubdate4\" style=width:120px;\">";
            ?>
            <script language="javascript" type="text/javascript">
              Calendar.setup({
                inputField     :    "pubdate4",
                ifFormat       :    "%Y-%m-%d %H:%M:%S",
                showsTime      :    true,
                timeFormat     :    "24"
              });
            </script>
            </td>
          </tr>
          <tr>
            <td width="90">&nbsp;标题6：</td>
            <td width='408'><input name="news_title[5]" type="text"  value="<?php echo $collegeinfo_news[5]['title']; ?>" style="width:388px" /></td>
            <td width="90">&nbsp;链接6：</td>
            <td><input name="news_link[5]" type="text" style="width:250px" value="<?php echo $collegeinfo_news[5]['link']; ?>"/></td>
            <td width="90">&nbsp;发布时间6：</td>
            <td>
            <?php
              $form_time = empty($collegeinfo_news[5]['addTime'])? GetDateTimeMk(time()) : date("Y-m-d H:i:s",$collegeinfo_news[5]['addTime']);
              echo "<input name=\"news_addtime[5]\" value=\"$form_time\" type=\"text\" id=\"pubdate5\" style=width:120px;\">";
            ?>
            <script language="javascript" type="text/javascript">
              Calendar.setup({
                inputField     :    "pubdate5",
                ifFormat       :    "%Y-%m-%d %H:%M:%S",
                showsTime      :    true,
                timeFormat     :    "24"
              });
            </script>
            </td>
          </tr>
          <tr>
            <td width="90">&nbsp;标题7：</td>
            <td width='408'><input name="news_title[6]" type="text"  value="<?php echo $collegeinfo_news[6]['title']; ?>" style="width:388px" /></td>
            <td width="90">&nbsp;链接7：</td>
            <td><input name="news_link[6]" type="text" style="width:250px" value="<?php echo $collegeinfo_news[6]['link']; ?>"/></td>
            <td width="90">&nbsp;发布时间7：</td>
            <td>
            <?php
              $form_time = empty($collegeinfo_news[6]['addTime'])? GetDateTimeMk(time()) : date("Y-m-d H:i:s",$collegeinfo_news[6]['addTime']);
              echo "<input name=\"news_addtime[6]\" value=\"$form_time\" type=\"text\" id=\"pubdate6\" style=width:120px;\">";
            ?>
            <script language="javascript" type="text/javascript">
              Calendar.setup({
                inputField     :    "pubdate6",
                ifFormat       :    "%Y-%m-%d %H:%M:%S",
                showsTime      :    true,
                timeFormat     :    "24"
              });
            </script>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9FCEF" style="border:1px solid #cfcfcf;border-top:none;">
    <tr>
      <td height="35"><table width="100%" border="0" cellspacing="1" cellpadding="1">
          <tr>
            <td width="17%">&nbsp;</td>
            <td width="83%"><table width="214" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="115"><input name="imageField" type="image" src="images/button_ok.gif" class='np' width="60" height="22" border="0"></td>
                  <td width="99"><img src="images/button_reset.gif" width="60" height="22" border="0" onClick="location.reload();" style="cursor:pointer;"></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
<script language='javascript'>InitPage();</script>

<script type="text/javascript">

/**
 * 添加教授信息
 */
function AddSignRow_professor(){ 

//读取最后一行的行号，存放在txtTRLastIndex文本框中 
var txtTRLastIndex_professor = document.getElementById("txtTRLastIndex_professor");
var rowID = parseInt(txtTRLastIndex_professor.value);

var signFrame = document.getElementById("professor_info");
//添加行
var newTR = signFrame.insertRow(signFrame.rows.length);
newTR.id = "professor" + rowID;

//添加列:序号
var newNameTD=newTR.insertCell(0);
//添加列内容
newNameTD.innerHTML = (newTR.rowIndex+1).toString();

//添加列:姓名
var newNameTD=newTR.insertCell(1);
//添加列内容
newNameTD.innerHTML = "&nbsp;教授姓名：";

// 添加列：姓名栏
var newNameTD=newTR.insertCell(2);
//添加列内容
newNameTD.innerHTML = "<input name=\"professor_name["+rowID+"]\" type='text'  value='' />";

// 添加列：照片
var newNameTD=newTR.insertCell(3);
//添加列内容
newNameTD.innerHTML = "&nbsp;教授照片：";

// 添加列：照片上传框
var newNameTD=newTR.insertCell(4);
//添加列内容，为了便于对提交数据后台的处理，这里新上传的也统一name为professor_picture_new
newNameTD.innerHTML = "<input name=\"professor_picture["+rowID+"]\" type='hidden' id='logo' size='30' value=''/>"+"<input name=\"professor_picture_new["+rowID+"]\" type='file' id='logo' size='30' />";
//添加列:删除按钮
var newDeleteTD=newTR.insertCell(5);
//添加列内容
newDeleteTD.innerHTML = "<a href='javascript:;' onclick=\"DeleteSignRow_professor('professor" + rowID + "')\">删除</a>";

//将行号推进下一行
txtTRLastIndex_professor.value = (rowID + 1).toString() ;
}

//删除指定行
function DeleteSignRow_professor(rowid){
var signFrame = document.getElementById("professor_info");
var signItem = document.getElementById(rowid);

//获取将要删除的行的Index
var rowIndex = signItem.rowIndex;
//删除指定Index的行
signFrame.deleteRow(rowIndex);

//重新排列序号，如果没有序号，这一步省略
for(i=rowIndex;i<signFrame.rows.length;i++){
  signFrame.rows[i].cells[0].innerHTML = (i+1).toString();
}
}


/**
 * 添加校友信息
 */
function AddSignRow_graduate(){ 

//读取最后一行的行号，存放在txtTRLastIndex文本框中 
var txtTRLastIndex_graduate = document.getElementById("txtTRLastIndex_graduate");
var rowID = parseInt(txtTRLastIndex_graduate.value);

var signFrame = document.getElementById("graduate_info");
//添加行
var newTR = signFrame.insertRow(signFrame.rows.length);
newTR.id = "graduate" + rowID;

//添加列:序号
var newNameTD=newTR.insertCell(0);
//添加列内容
newNameTD.innerHTML = (newTR.rowIndex+1).toString();

//添加列:姓名
var newNameTD=newTR.insertCell(1);
//添加列内容
newNameTD.innerHTML = "&nbsp;校友姓名：";

// 添加列：姓名栏
var newNameTD=newTR.insertCell(2);
//添加列内容
newNameTD.innerHTML = "<input name=\"graduate_name["+rowID+"]\" type='text'  value='' />";

// 添加列：照片
var newNameTD=newTR.insertCell(3);
//添加列内容
newNameTD.innerHTML = "&nbsp;校友照片：";

// 添加列：照片上传框
var newNameTD=newTR.insertCell(4);
//添加列内容，为了便于对提交数据后台的处理，这里新上传的也统一name为graduate_picture_new
newNameTD.innerHTML = "<input name=\"graduate_picture["+rowID+"]\" type='hidden' id='logo' size='30' value=''/>"+"<input name=\"graduate_picture_new["+rowID+"]\" type='file' id='logo' size='30' />";
//添加列:删除按钮
var newDeleteTD=newTR.insertCell(5);
//添加列内容
newDeleteTD.innerHTML = "<a href='javascript:;' onclick=\"DeleteSignRow_graduate('graduate" + rowID + "')\">删除</a>";

//将行号推进下一行
txtTRLastIndex_graduate.value = (rowID + 1).toString() ;
}

//删除指定行
function DeleteSignRow_graduate(rowid){
var signFrame = document.getElementById("graduate_info");
var signItem = document.getElementById(rowid);

//获取将要删除的行的Index
var rowIndex = signItem.rowIndex;
//删除指定Index的行
signFrame.deleteRow(rowIndex);

//重新排列序号，如果没有序号，这一步省略
for(i=rowIndex;i<signFrame.rows.length;i++){
  signFrame.rows[i].cells[0].innerHTML = (i+1).toString();
}
}


/**
 * 添加项目特色信息
 */
function AddSignRow_project(){ 

//读取最后一行的行号，存放在txtTRLastIndex文本框中 
var txtTRLastIndex_project = document.getElementById("txtTRLastIndex_project");
var rowID = parseInt(txtTRLastIndex_project.value);

var signFrame = document.getElementById("project_info");
//添加行
var newTR = signFrame.insertRow(signFrame.rows.length);
newTR.id = "project" + rowID;

//添加列:序号
var newNameTD=newTR.insertCell(0);
//添加列内容
newNameTD.innerHTML = (newTR.rowIndex+1).toString();

//添加列:姓名
var newNameTD=newTR.insertCell(1);
//添加列内容
newNameTD.innerHTML = "&nbsp;小标题：";

// 添加列：姓名栏
var newNameTD=newTR.insertCell(2);
//添加列内容
newNameTD.innerHTML = "<input name=\"project_title["+rowID+"]\" type='text'  value='' />";

// 添加列：照片
var newNameTD=newTR.insertCell(3);
//添加列内容
newNameTD.innerHTML = "&nbsp;内容：";

// 添加列：照片上传框
var newNameTD=newTR.insertCell(4);
//添加列内容
newNameTD.innerHTML = "<textarea name=\"project_content["+rowID+"]\" rows='8' style='width:520px;height:70px'></textarea>";

//添加列:删除按钮
var newDeleteTD=newTR.insertCell(5);
//添加列内容
newDeleteTD.innerHTML = "<a href='javascript:;' onclick=\"DeleteSignRow_project('project" + rowID + "')\">删除</a>";

//将行号推进下一行
txtTRLastIndex_project.value = (rowID + 1).toString() ;
}

//删除指定行
function DeleteSignRow_project(rowid){
var signFrame = document.getElementById("project_info");
var signItem = document.getElementById(rowid);

//获取将要删除的行的Index
var rowIndex = signItem.rowIndex;
//删除指定Index的行
signFrame.deleteRow(rowIndex);

//重新排列序号，如果没有序号，这一步省略
for(i=rowIndex;i<signFrame.rows.length;i++){
  signFrame.rows[i].cells[0].innerHTML = (i+1).toString();
}
}

</script>
</body>
</html>